<%@ page import="com.itheima.el.Student" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.HashMap" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>$Title$</title>
</head>
<body>
<%pageContext.setAttribute("username", 22);%>
${username}<br>
<%Student student = new Student("张三", 33);%>
<%pageContext.setAttribute("student", student);%>
${student}<br>
${student.name}<br>
${student.age}<br>
<%String[] arr = {"ee", "rr"};%>
<%pageContext.setAttribute("arr", arr);%>
${arr}<br>
${arr[0]}<br>
${arr[1]}<br>
<%--${arr[5]}<br>--%>
<%--没有索引越界异常--%>
<%--没有字符串拼接问题,输出后还是+连接--%>
${arr[0]}+${arr[1]}<br>
<%
    ArrayList<String> list = new ArrayList<>();
    list.add("张三");
    list.add("张三");
    pageContext.setAttribute("list", list);
%>
${list}<br>
${list[0]}<br>
${list[1]}<br>
<%
    HashMap<String, Student> hashMap = new HashMap();
    hashMap.put("ss", new Student("zhang", 23));
    hashMap.put("ee", new Student("zhang", 23));
    pageContext.setAttribute("hashmap", hashMap);
%>
${hashmap}<br>
${hashmap.ss.name}<br>
${hashmap.ss.age}<br>
<%--22--%>
<%--Student{name='张三', age=33}--%>
<%--张三--%>
<%--33--%>
<%--[Ljava.lang.String;@6897196c--%>
<%--ee--%>
<%--rr--%>
<%--ee+rr--%>
<%--[张三, 张三]--%>
<%--张三--%>
<%--张三--%>
<%--{ss=Student{name='zhang', age=23}, ee=Student{name='zhang', age=23}}--%>
<%--zhang--%>
<%--23--%>
</body>
</html>
